import React from 'react'
import {Col, Row} from "antd";

import {WeaLocaleProvider,WeaInputNumber,WeaCheckbox,WeaColorPicker} from "ecCom";
const getLabel = WeaLocaleProvider.getLabel;

export default class SettingExtend extends React.Component{

    render (){
        const {setting,setSetting} = this.props
        const {showNumber,remindLogo,remindWeight,remindOblique,hasRemindColor,remindColor} = setting
        return (
            <div className="workflow-settingExtend">
                <div style={{'margin-top':'10px'}}>
                    <Row ecId={`${this && this.props && this.props.ecId || ''}_Row@qpne1w`}>
                        <Col ecId={`${this && this.props && this.props.ecId || ''}_Col@2fmnc8`} span={6}>
                            <div>{getLabel(19493, '显示条数')} :</div>
                        </Col>
                        <Col ecId={`${this && this.props && this.props.ecId || ''}_Col@wc4833`} span={18}>
                            <WeaInputNumber ecId={`${this && this.props && this.props.ecId || ''}_WeaInputNumber@gmek17`}  value={showNumber} viewAttr={2} onChange={value => setSetting({showNumber: value})}/>
                        </Col>
                    </Row>
                </div>
                <div style={{'margin-top':'10px'}} className="first-items">
                    <Row ecId={`${this && this.props && this.props.ecId || ''}_Row@xlqd7z`}>
                        <Col ecId={`${this && this.props && this.props.ecId || ''}_Col@0bnu35`} span={6} >
                            <div>{getLabel(18713, '提醒方式')} :</div>
                        </Col>
                        <Col ecId={`${this && this.props && this.props.ecId || ''}_Col@mou60w`} span={18}>
                            <div>
                                <div style={{display:'inline-block','vertical-align':'middle'}}>
                                    <WeaCheckbox ecId={`${this && this.props && this.props.ecId || ''}_WeaCheckbox@8yfixh`}
                                        value={remindLogo}
                                        onChange={(value) => {
                                            setSetting({
                                                remindLogo: value,
                                            });
                                        }}
                                    />
                                    <span className="nameSpaceing">{getLabel(22969, '图标')}</span>
                                </div>

                                <div style={{display:'inline-block','vertical-align':'middle'}}>
                                    <WeaCheckbox ecId={`${this && this.props && this.props.ecId || ''}_WeaCheckbox@66vrhc`}
                                        value={remindWeight}
                                        onChange={(value) => {
                                            setSetting({
                                                remindWeight: value,
                                            });
                                        }}
                                    />
                                    <span className="nameSpaceing">{getLabel(16198, '加粗')}</span>
                                </div>
                                <div style={{display:'inline-block','vertical-align':'middle'}}>
                                    <WeaCheckbox ecId={`${this && this.props && this.props.ecId || ''}_WeaCheckbox@tl5j4g`}
                                        value={remindOblique}
                                        onChange={(value) => {
                                            setSetting({
                                                remindOblique: value,
                                            });
                                        }}
                                    />
                                    <span className="nameSpaceing">{getLabel(16199, '倾斜')}</span>
                                </div>

                                <div style={{display:'inline-block','vertical-align':'middle'}}>
                                    <WeaCheckbox ecId={`${this && this.props && this.props.ecId || ''}_WeaCheckbox@mpgtal`}
                                        value={hasRemindColor}
                                        onChange={(value) => {
                                            setSetting({
                                                hasRemindColor: value,
                                            });
                                        }}
                                    />
                                    <span className="nameSpaceing">{getLabel(495, '颜色')}</span>
                                </div>

                                {
                                    hasRemindColor == '1' ? (
                                        <div style={{display:'inline-block','vertical-align':'middle'}}>
                                            <WeaColorPicker ecId={`${this && this.props && this.props.ecId || ''}_WeaColorPicker@1tvsne`}
                                                value={remindColor}
                                                onChange={(value) => {
                                                    setSetting({
                                                        remindColor: value,
                                                    });
                                                }}
                                            />
                                        </div>
                                    ) : null
                                }

                            </div>

                        </Col>
                    </Row>
                </div>
            </div>
        )
    }
}